package ${config.modulePackage};

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import lombok.experimental.Accessors;

/**
* 描述：${info.tableComment}
* @author ${config.author}
* @date ${.now}
*/
@Data
@ToString
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value="${info.tableName}")
public class ${info.className}${config.moduleSuffix} {
<#list info.columns as tableField>

    /**
     *${tableField.columnComment}
     */
    <#if tableField.columnKey?? && tableField.columnKey=='PRIMARY'>
        <#if tableField.isAutoIncrement?? && tableField.isAutoIncrement=='YES'>
    @TableId(value = "${tableField.columnName}", type = IdType.AUTO)
        <#else>
    @TableId(value = "${tableField.columnName}", type = IdType.ASSIGN_ID)
        </#if>
    <#else>
    @TableField(value = "${tableField.columnName}")
    </#if>
    private ${tableField.columnType} ${tableField.fieldName};
</#list>
}